home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-05-01 | 2.9 KB | 116 lines | [TEXT/MPS ] |
- {
- File: NVRAMPlugin.p
-
- Version: Technology:
- Release: Universal Interfaces 3.0d3 on Copland DR1
-
- Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
-
- Bugs?: If you find a problem with this file, send the file and version
- information (from above) and the problem description to:
-
- Internet: apple.bugs@applelink.apple.com
- AppleLink: APPLE.BUGS
-
- }
- {$IFC UNDEFINED UsingIncludes}
- {$SETC UsingIncludes := 0}
- {$ENDC}
-
- {$IFC NOT UsingIncludes}
- UNIT NVRAMPlugin;
- INTERFACE
- {$ENDC}
-
- {$IFC UNDEFINED __NVRAMPLUGIN__}
- {$SETC __NVRAMPLUGIN__ := 1}
-
- {$I+}
- {$SETC NVRAMPluginIncludes := UsingIncludes}
- {$SETC UsingIncludes := 1}
-
- {$IFC UNDEFINED __TYPES__}
- {$I Types.p}
- {$ENDC}
-
- {$PUSH}
- {$ALIGN MAC68K}
- {$LibExport+}
-
- {$IFC FOR_SYSTEM8_PREEMPTIVE }
- {
- ≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
- status codes
- ≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
- }
-
- CONST
- kNVRAMNoError = 0;
- kNVRAMTimeout = 1;
- kNVRAMUnexpectedError = 2;
- kNVRAMMemoryError = 3;
- kNVRAMParameterError = 4;
- kNVRAMDeviceError = 5;
- kNVRAMUnexpectedDeviceRequest = 6;
- kNVRAMControllerError = 7;
- kNVRAMConsistencyCheckError = 8;
-
- {
- ≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
- Plugin Calls Provided by the Family
- ≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
- }
- PROCEDURE NVRAMFamRequestComplete(theStatus: OSStatus); C;
- {
- ≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
- Plugin Calls Provided by the Plugin
- ≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
- all plugin calls are async
- the plugin starts the i/o and returns immediately
- the plugin ISR calls NVRAMFamRequestComplete() when the i/o is completed
- }
-
- TYPE
- NVRAMPluginInitPtr = ProcPtr; { FUNCTION NVRAMPluginInitPtr: OSStatus; C; }
-
- NVRAMPluginReadPtr = ProcPtr; { FUNCTION NVRAMPluginReadPtr(offset: UInt16; VAR data: UInt8; count: UInt16): OSStatus; C; }
-
- NVRAMPluginWritePtr = ProcPtr; { FUNCTION NVRAMPluginWritePtr(offset: UInt16; VAR data: UInt8; count: UInt16): OSStatus; C; }
-
-
- CONST
- kNVRAMPluginCurrentRevision = $000D11E2;
-
-
- TYPE
- NVRAMPluginVersionPtr = ^NVRAMPluginVersion;
- NVRAMPluginVersion = RECORD
- major: UInt32;
- reserved0: UInt32;
- reserved1: UInt32;
- reserved2: UInt32;
- END;
-
- NVRAMPluginDispatchTablePtr = ^NVRAMPluginDispatchTable;
- NVRAMPluginDispatchTable = RECORD
- version: NVRAMPluginVersion;
- Init: NVRAMPluginInitPtr;
- Read: NVRAMPluginReadPtr;
- Write: NVRAMPluginWritePtr;
- END;
-
- FUNCTION NVRAMPluginInit: OSStatus; C;
- FUNCTION NVRAMPluginRead(offset: UInt16; VAR data: UInt8; count: UInt16): OSStatus; C;
- FUNCTION NVRAMPluginWrite(offset: UInt16; VAR data: UInt8; count: UInt16): OSStatus; C;
- {$ENDC}
- {$ALIGN RESET}
- {$POP}
-
- {$SETC UsingIncludes := NVRAMPluginIncludes}
-
- {$ENDC} {__NVRAMPLUGIN__}
-
- {$IFC NOT UsingIncludes}
- END.
- {$ENDC}
-